package com.chatinterfaceuni.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chatinterfaceuni.entity.CommodityOrder;
import com.chatinterfaceuni.mapper.CommodityOrderMapper;
import com.chatinterfaceuni.service.ICommodityOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

@Component
@Service
public class CommodityOrderService  extends ServiceImpl<CommodityOrderMapper, CommodityOrder> implements ICommodityOrderService {

    @Autowired
    CommodityOrderMapper commodityOrderMapper;

    @Override
    public List<CommodityOrder> selectList(String user) {
        QueryWrapper<CommodityOrder> queryWrapper = new QueryWrapper<CommodityOrder>();
        queryWrapper.like("create_user",user);
        return commodityOrderMapper.selectList(queryWrapper);
    }
}
